package com.lwj.test.gof.singleton;

/**
 * 单例模式
 * @author Administrator
 *
 */
public class Singleton {

    private static Singleton instance=null;
    
    public Singleton(){
    }
    public static Singleton getInstance(){   
        if(instance==null){   
            return instance=new Singleton();   
        }else{   
            return instance;   
        }   
    }
}
